// ------- 表格 ---------
.ant-table-wrapper {

  *[class*=table],
  table {
    border-color: #DCE2ED !important;
  }

  .ant-table-pagination {
    margin-bottom: 8px;

    // table的总页数
    .ant-pagination-total-text {
      color: #3C4761 !important;
    }
  }

  // thead
  .ant-table-thead {
    height: 40px;

    .ant-table-cell {
      background-color: #F7F9FC;
      color: #3C4761;
      font-weight: 500;
    }
  }
  .ant-table-cell {
    padding: 8px 16px !important;
    color: #3C4761;
  }
}
//--------------- 表格结束 ------------------
// checkbox
.ant-checkbox-checked .ant-checkbox-inner {
  border-color: #2663FF;
  background-color: #2663FF;
}
.ant-radio {
  &.ant-radio-checked {
    .ant-radio-inner {
      border-color: #2663FF;
    }
  }
  &.ant-radio-checked::after {
    border: 1px solid #2663FF;
  }
}
// --------tabs 开始--------
.ant-tabs.ant-tabs-top {
  .ant-tabs-nav {
    &::before {
      content: none;
    }
  }
  .ant-tabs-nav-wrap {
    .ant-tabs-tab {
      padding: 12px 2px;
      color: #6b7a99;
      font-weight: 500;
      &.ant-tabs-tab-active .ant-tabs-tab-btn {
        color: #2663ff;
        font-family: PingFang SC;
        font-weight: 500;
        font-size: 14px;
        line-height: 22px;
        letter-spacing: 0px;
        text-align: left;
        .box{
          [class*="g-icon"] {
            background-color: #2663ff;
          }
        }
      }
      .box{
        display: flex;
        align-items: center;
        span{
          display:inline-block
        }
        [class*="g-icon"] {
          background-color: #7487A3;
          margin-right: 8px;
        }
      }
     
    }

    .ant-tabs-ink-bar {
      height: 2px;
      border-radius: 2px;
      background: #2663ff;
    }
  }
}

// tabs二级
.ant-tabs.ant-tabs-top.tabs-secondary {
  .ant-tabs-nav {
    margin-bottom: 0;

    &::before {
      content: none;
    }
  }

  .ant-tabs-tab:not(:first-child)::before {
    content: "";
    position: absolute;
    left: -20px;
    width: 2px;
    height: 40px;

    display: inline-block;
    background: url("@src/img/split.png");
    background-position: center;
    background-size: 100% 60%;
    background-repeat: no-repeat;
  }

  .ant-tabs-ink-bar {
    height: 0;
  }
}

// --------tabs 结束 --------

// ---------select开始------------
.ant-select {

  // 默认
  &:not(.ant-select-customize-input) .ant-select-selector {
    border-color: #DCE2ED;
    border-radius: 4px;

    .ant-select-selection-item {
      color: #20283E;
    }
  }
  .ant-select-suffix {
    color: #A2A8B5;
  }

  // hover
  &:not(.ant-select-disabled):hover .ant-select-selector {
    border-color: #2663FF;
  }

  // 禁用
  &.ant-select-disabled:not(.ant-select-customize-input) .ant-select-selector {
    background-color: #F7F9FC;

    .ant-select-selection-item {
      color: #A2A8B5;
    }
  }

  .ant-select-selection-placeholder {
    color: #BBC2CF;
  }

  &.ant-select-disabled .ant-select-selection-placeholder {
    color: #BBC2CF;
  }
}

// focus
.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {
  border-color: #2663FF;
  box-shadow: 0 0 0 2px rgba(38, 99, 255, 0.2);
}
// 下拉菜单
.ant-select-dropdown {
  padding: 8px;
  .ant-select-item {
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 2px;
    color: #3C4761;
  }
  .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
    background-color: #ECF1FF;
    color: #4170FF;
  }
  // item禁用
  .ant-select-item-option-disabled {
    background-color: #F7F9FC;
    color: #BBC2CF;
  }
}

// ---------select结束------------

// ---------tree开始------------
.ant-tree {
  background-color: transparent;

  .ant-tree-treenode {
    width: 100%;
    padding: 0;
    margin-bottom: 4px;

    &.ant-tree-treenode-selected {
      background-color: #e5ebff;
      color: #2663FF;
    }
  }

  .ant-tree-node-content-wrapper {
    width: 100%;

    &:hover {
      background-color: transparent;
    }

    &.ant-tree-node-selected {
      background-color: transparent;
    }

    .ant-tree-title {
      width: 100%;
      display: inline-block;
    }
  }
}

.ant-tree-checkbox-checked .ant-tree-checkbox-inner {
  background-color: #2663FF;
  border-color: #2663FF;
}

.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner::after {
  background-color: #2663FF;
}

.ant-tree-checkbox-disabled .ant-tree-checkbox-inner {
  border-color: #c3cad9 !important;
  background-color: #f6f8fb;
}

// ---------tree结束------------

// ---------input开始------------
// 所有的placeholder
*:not([disabled])::placeholder {
  color: #BBC2CF !important;
}
.ant-input {
  border-color: #DCE2ED;
  border-radius: 4px;
  color: #20283E;

  &:hover {
    border-color: #2663FF;
  }

  &:focus {
    border-color: #2663FF;
    box-shadow: 0 0 0 2px rgba(65, 112, 255, 0.3);
  }

  &[disabled] {
    border-color: #DCE2ED;
    background-color: #F7F9FC;
    color: #A2A8B5;

    &::placeholder {
      color: #BBC2CF;
    }
  }
}
// 带有affix的input
.ant-input-affix-wrapper {
  border-radius: 4px;
  border-color: #DCE2ED;
  color: #A2A8B5; // affix的颜色
  &:not(.ant-input-affix-wrapper-disabled):hover {
    border-color: #2663FF;
  }

  &:focus,
  &.ant-input-affix-wrapper-focused{
    border-color: #2663FF;
    box-shadow: 0 0 0 2px rgba(65, 112, 255, 0.3);
  }

  &.ant-input-affix-wrapper-disabled {
    border-color: #DCE2ED;
    background-color: #F7F9FC;
    color: #A2A8B5;

    &::placeholder {
      color: #BBC2CF;
    }
  }
}

// 带addonBefore的input
.ant-input-group-addon {
  border-color: #DCE2ED;
  background-color: #F7F9FC;
  color: #A2A8B5;
}

// ---------input结束------------

// ---------btn开始------------
.ant-btn {
  border-radius: 4px;
  [class*="g-icon"] {
    margin-right: 8px;
  }

  //.iconfont {
  //  margin-right: 8px;
  //  vertical-align: middle;
  //  position: relative;
  //  bottom: 1px;
  //}
}

.ant-btn-primary {
  background-color: #2663FF;
  border-color: #2663FF;

  &:hover {
    background-color: #5182FF;
    border-color: #5182FF;
  }

  &:focus {
    background-color: #5182FF;
    border-color: #5182FF;
  }

  &[disabled] {
    border-color: #97B4FF !important;
    color: #fff !important;
    background-color: #97B4FF !important;
  }
}

.ant-btn-background-ghost.ant-btn-primary {
  color: #2663FF;
  border-color: #5182FF;

  &:hover {
    color: #2663FF;
    border-color: #5182FF;
    background-color: #EBF0FF;
  }

  &:focus {
    color: #2663FF;
    border-color: #5182FF;
    background-color: #EBF0FF;
  }

  &:not(.ant-btn-loading){
    [class*="g-icon"] {
      background-color: #2663FF;
    }
  }

  &[disabled] {
    border-color: #97B4FF !important;
    background-color: #EBF0FF !important;
    color: #97B4FF !important;

    &:not(.ant-btn-loading){
      [class*="g-icon"] {
        background-color: #97B4FF;
      }
    }
  }
}

.ant-btn-link {
  color: #2663FF;
  padding-left: 0;
  padding-right: 0;

  &:hover {
    color: #5182FF;
  }

  &:focus {
    color: #2663FF;
  }

  [class*="g-icon"] {
    background-color: #2663FF;
  }

  &[disabled] {
    color: #A2A8B5 !important;

    [class*="g-icon"] {
      background-color: #c3cad9 !important;
    }
  }
}
.ant-btn-default:not(.ant-btn-dangerous) {
  color: #3C4761;
  border-color: #DCE2ED;
  //.iconfont {
  //  color: #7487A3;
  //}
  &:not(.ant-btn-loading) [class*="g-icon"] {
    transition: all 0.2s;
    background-color: #3c4761;
  }

  &:hover,
  &:focus {
    color: #2663FF;
    border-color: #5182FF;
    background-color: #EBF0FF;
    &:not(.ant-btn-loading) [class*="g-icon"] {
      background-color: #2663ff;
    }
    //.iconfont {
    //  color: #2663FF;
    //}
  }

  &[disabled] {
    border-color: #DCE2ED !important;
    background-color: #F7F9FC !important;
    color: #A2A8B5 !important;
    [class*="g-icon"] {
      background-color: #a2a8b5 !important;
    }
    //.iconfont {
    //  color: #A2A8B5 !important;
    //}
  }
}
// ---------btn结束------------

// ---------分页开始------------
.ant-pagination {
  .ant-pagination-item-link,
  .ant-pagination-item {
    border-color: #BBC2CF;
    border-radius: 2px;
    color: #3C4761;
  }

  .ant-pagination-item {
    a {
      color: #3C4761;
    }

    &.ant-pagination-item-active {
      background-color: #2663FF;
      border-color: #2663FF;

      a {
        color: #fff !important;
      }
    }

    &:not(.ant-pagination-item-active):hover {
      border-color: #2663FF;

      a {
        &:hover {
          color: #2663FF !important;
        }
      }
    }
  }
}

// ---------分页结束------------

// ---------switch开始------------
// 修改switch 开关 阴影
.ant-switch:focus {
  box-shadow: none;
}
.ant-switch-checked {
  background-color: #2663FF;
}
// ---------switch结束------------

// ---------modal开始------------
.ant-modal-wrap {
  .ant-modal-content {
    border-radius: 4px;
  }
  .ant-modal-close-x {
    height: 48px;
    line-height: 48px;
    width: 48px;
    svg {
      color: #7487a3;
    }
  }

  .ant-modal-header {
    height: 48px;
    background-color: #fff;
    box-shadow: inset 0px -1px 0px 0px #e9ebf0;
    display: flex;
    align-items: center;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
  }

  .ant-modal-title {
    position: relative;
    line-height: 24px;
    padding-left: 16px;
    color: #3c4761;
    font-weight: 500;
    font-size: 16px;

    &::before {
      content: "";
      display: block;
      position: absolute;
      left: 0;
      top: 1px;
      width: 6px;
      height: 20px;
      border-radius: 4px;
      background: #2663ff;
    }
  }

  .ant-modal-body {
    color: #1e2e4c;
    padding: 48px;
    position: relative;

    // modal.confirm配置
    .ant-modal-confirm-body-wrapper {
      margin-bottom: 24px;
      .ant-modal-confirm-btns {
        position: absolute;
        bottom: 24px;
        right: 24px;
        .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
          margin-left: 12px;
        }
      }
    }
  }

  .ant-modal-footer {
    height: 56px;
    border-top: none;
    padding-left: 24px;
    padding-right: 24px;
    border-radius: 0 0 4px 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 12px;
    .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
      margin-left: 12px;
    }
  }
}

// ---------modal结束------------

// ---------日期选择器开始------------
//.ant-picker,
.ant-picker-range {
  border-radius: 4px;
  border-color: #DCE2ED;
  &:hover {
    border-color: #2663FF;
  }
  &.ant-picker-focused {
    border: 1px solid #2663FF !important;
    box-shadow: 0 0 0 2px rgba(38, 99, 255, 0.2);
  }
}
// ---------日期选择器结束------------
// 表单 ----------
.ant-form {
  .ant-form-item-label > label {
    color: #3c4761;
    font-family: PingFang SC;
    font-weight: 500;
    font-size: 14px;
    text-align: right;
  }

  .ant-form-item-explain {
    position: relative;
    top: 2px;
    font-size: 12px;
    line-height: 12px;
  }
}
// 表单结束 ----------

// ---------dropdown开始------------
.ant-dropdown {
  border-radius: 4px;

  .ant-dropdown-menu {
    padding: 8px;

    .ant-dropdown-menu-item {
      border-radius: 2px;

      &-active {
        background-color: #ECF1FF;
        color: #4170FF;
      }
    }
  }
}
// ---------dropdown结束------------

// ---------steps开始------------
.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-icon {
  background-color: #2663ff;
}
// ---------steps结束------------
